﻿using System;
using Alex.Framework.Domain.Transcation;

namespace Alex.Framework.Domain.Repositories
{
    /// <summary>
    /// 支持事务的仓储上下文
    /// </summary>
    public abstract class TranscationRepositoryContextBase : RepositoryContextBase, ITranscationRepositoryContext
    {
        /// <summary>
        /// 获取当前事务处理状态
        /// </summary>
        public abstract TranscationState State { get; }

        /// <summary>
        /// 提交事务
        /// </summary>
        public abstract void Commit();

        /// <summary>
        /// 回滚事务
        /// </summary>
        public abstract void Rollback();
    }
}
